#include<iostream>

using namespace std;
//数据抽象实例
class Addr{
    public:
        Addr(int i = 0){
            total = i;
        }
        void addNum(int number){
            total += number;
        }
        int getTotal(){
            return total;
        }
    private:
        int total;
};

int main()
{
    Addr a;
    a.addNum(10);
    a.addNum(20);
    a.addNum(30);
    cout<< "total=>"<<a.getTotal()<<endl;
    return 0;
}